<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" import="com.sakila.dao.FilmDAO"
	import="java.util.List" import="java.util.Map"
	import="com.sakila.services.FilmActorServiceImpl"
	import="com.sakila.dbo.FilmDBO" import="com.sakila.dbo.ActorDBO" import="java.util.Iterator"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
FilmActorServiceImpl film = new FilmActorServiceImpl();
List<Map<Integer, List<ActorDBO>>> flist = film.getActorsByFilm();
Integer filmId = Integer.parseInt(request.getParameter("mydrop"));
%>
<%
	for (Map<Integer, List<ActorDBO>> map : flist){
		List<ActorDBO> actorlist = map.get(filmId);
				
	%>
	
	<table border="1">
   <tr bgcolor="yellow">
     <th>Actor ID</th>
     <th>First Name</th>
     <th>Last Name</th>
     <th>Last Update</th>
   </tr>
   <%
   	for(ActorDBO aco: actorlist){
   %>
   <tr bgcolor="lightblue">
     <td><%= aco.getActorID()%></td>
     <td><%=aco.getFirstName()%></td>
     <td><%=aco.getLastName()%></td>
    <td><%=aco.getLastUpdate()%></td> 
   </tr>
   <%}} %>
 </table> 
</body>
</html>